%% simple indexing ==============================
A = reshape(1:100,10,10)
A(1,1)


%% slicing ======================================
A(1:10,1:end)
A(1:10,:)
A(1:2:10,1:2:10)


%% indexing with vectors of indices =============
idx = [1 3 7 9];
A(idx, idx)


%% indexing with logicals (booleans) =======================

% example: find all odd indices
idx = mod(1:10,2) == 1
A(idx, idx)

idx = mod(A, 2) == 1

A(idx)
